home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kontact / summary.h < prev   
Encoding:
C/C++ Source or Header  |  2005-09-10  |  2.7 KB  |  95 lines

  1. /*
  2.    This file is part of KDE Kontact.
  3.  
  4.    Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
  5.  
  6.    This library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Library General Public
  8.    License as published by the Free Software Foundation; either
  9.    version 2 of the License, or (at your option) any later version.
  10.  
  11.    This library is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.    Library General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU Library General Public License
  17.    along with this library; see the file COPYING.LIB.  If not, write to
  18.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  19.    Boston, MA 02110-1301, USA.
  20. */
  21. #ifndef KONTACT_SUMMARY_H
  22. #define KONTACT_SUMMARY_H
  23.  
  24. #include <qwidget.h>
  25. #include <qpixmap.h>
  26. #include <kdepimmacros.h>
  27.  
  28. class KStatusBar;
  29.  
  30. namespace Kontact
  31. {
  32.  
  33. /**
  34.   Summary widget for display in the Summary View plugin.
  35.  */
  36. class KDE_EXPORT Summary : public QWidget
  37. {
  38.   Q_OBJECT
  39.  
  40.   public:
  41.     Summary( QWidget *parent, const char *name = 0 );
  42.  
  43.     virtual ~Summary();
  44.  
  45.     /**
  46.       Return logical height of summary widget. This is used to calculate how
  47.       much vertical space relative to other summary widgets this widget will use
  48.       in the summary view.
  49.     */
  50.     virtual int summaryHeight() const { return 1; }
  51.  
  52.     /**
  53.       Creates a heading for a typical summary view with an icon and a heading.
  54.      */
  55.     QWidget *createHeader( QWidget* parent, const QPixmap &icon,
  56.                            const QString& heading );
  57.  
  58.     /**
  59.       Return list of strings identifying configuration modules for this summary
  60.       part. The string has to be suitable for being passed to
  61.       KCMultiDialog::addModule().
  62.     */
  63.     virtual QStringList configModules() const { return QStringList(); }
  64.  
  65.   public slots:
  66.     virtual void configChanged() {}
  67.  
  68.     /**
  69.       This is called if the displayed information should be updated.
  70.       @param force true if the update was requested by the user
  71.     */
  72.     virtual void updateSummary( bool force = false ) { Q_UNUSED( force ); }
  73.  
  74.   signals:
  75.     void message( const QString &message );
  76.     void summaryWidgetDropped( QWidget *target, QWidget *widget, int alignment );
  77.  
  78.   protected:
  79.     virtual void mousePressEvent( QMouseEvent* );
  80.     virtual void mouseMoveEvent( QMouseEvent* );
  81.     virtual void dragEnterEvent( QDragEnterEvent* );
  82.     virtual void dropEvent( QDropEvent* );
  83.  
  84.   private:
  85.     KStatusBar *mStatusBar;
  86.     QPoint mDragStartPoint;
  87.  
  88.     class Private;
  89.     Private *d;
  90. };
  91.  
  92. }
  93.  
  94. #endif
  95.